package com.wanmait.schedule.controller;

import com.github.pagehelper.PageInfo;
import com.wanmait.schedule.entity.LoginLog;
import com.wanmait.schedule.mapper.LoginLogMapper;
import com.wanmait.schedule.service.LoginLogService;
import com.wanmait.schedule.util.AjaxResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 登录日志表 前端控制器
 * </p>
 *
 * @author wanmait
 * @since 2022-12-05
 */
@RestController
@RequestMapping("/manage/loginLog")
public class LoginLogController {
    @Resource
    private LoginLogService loginLogService;
    //  列表分页
    @PostMapping("list")
    public AjaxResult list(@RequestBody LoginLog loginLog,Integer pageNum) {
        PageInfo<LoginLog> pageInfo = loginLogService.list(loginLog, pageNum);
        return AjaxResult.success(pageInfo);


    }


}
